﻿namespace RabbitDownload.WebSite.Ehentai
{
    internal class EhentaiHelper
    {
        private static int previewModeCount = 30;
        private static bool previewMode = false;

        /// <summary>
        /// 预览模式下载多少张
        /// </summary>
        public static int PreviewModeCount { get => previewModeCount; set => previewModeCount = value; }

        /// <summary>
        /// 预览模式
        /// </summary>
        public static bool PreviewMode { get => previewMode; set => previewMode = value; }

        /// <summary>
        /// 获取需要下载的分类
        /// </summary>
        /// <param name="ClassText"></param>
        /// <returns></returns>
        public static string GetClassify(string ClassText)
        {
            string API = "https://e-hentai.org/{0}/{1}";
            string AllAPI = "https://e-hentai.org/?page={0}";

            switch (ClassText)
            {
                case "全部":
                    return AllAPI;

                default:
                    return string.Format(API, ClassText, "{0}");
            }
        }
    }
}